Skip to content

Open Save as... dialog when saving sketches for the first time #579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 10, 2021

Conversation

federicobond
Copy link
Contributor

@federicobond federicobond commented Oct 28, 2021

Closes #64

This is my first contribution to arduino-ide, please let me know if anything is missing.

Without this fix, sketches report their URI path as /private/var/xxx
whereas `os.tmpdir()` returns /var/xxx. The second path can be turned
into the first by resolving symlinks, which gives a canonical path to
compare against.
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Oct 28, 2021
@rsora rsora changed the title Open Save as... dialog when saving sketches for the first time Open Save as... dialog when saving sketches for the first time Oct 28, 2021
@ubidefeo
Copy link

ubidefeo commented Nov 2, 2021

hi @federicobond

This also fixes saving opened examples.
Thank you.

We'll do a code review and get back to you asap ✌️

@ubidefeo ubidefeo requested review from fstasi and AlbyIanna November 2, 2021 14:27
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it out and it works just as expected for me. Thanks @federicobond!

@91volt
Copy link

91volt commented Nov 3, 2021

@federicobond Thanks for your contribution! I was checking the behavior when autosave is on and you try to close a newly created or example sketch: it works as expected on cmd/ctrl + w or going to file > close, but I've noticed that the dialog doesn't show when quitting the whole arduino IDE cmd/ctrl + q or closing the workspace from the OS top bar's red quitting icon. Would you be willing to address this one?

@federicobond
Copy link
Contributor Author

@91volt I could not reproduce that. I'm seeing the Are you sure you want to close this sketch? dialog in both cases, with Yes/No buttons.

@91volt
Copy link

91volt commented Nov 3, 2021

@federicobond Are you sure auto save is enabled? Arduino IDE / File > Preferences > ☑ Auto save

@federicobond
Copy link
Contributor Author

@91volt interesting... I think it's a bit different problem, so if there aren't any other objections I would prefer to keep that fix out of the scope of this pull request.

I might take a look at it later.

@91volt
Copy link

91volt commented Nov 4, 2021

@federicobond thanks for checking it, I guess you are right, I'm gonna add a separate issue for that.

Copy link
Contributor

@AlbyIanna AlbyIanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✨

✅ Code review

@federicobond Thank you so much for contributing, your help is very useful and very very much appreciated 😉

@AlbyIanna AlbyIanna merged commit 437caeb into arduino:main Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Saving new sketch saves to temporary folder
5 participants